package com.ljh.service.Impl;

import com.ljh.mapper.CollectionMapper;
import com.ljh.mapper.SongMapper;
import com.ljh.mapper.listMapper;
import com.ljh.pojo.SList;
import com.ljh.service.CartService;
import com.ljh.vo.CollectionSongVo;
import com.ljh.vo.ListSongVo;
import com.ljh.vo.SongListVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CartServiceImpl implements CartService {

    @Autowired
    SongMapper songMapper;

    @Autowired
    CollectionMapper collectionMapper;

    @Autowired
    listMapper listMapper;

    @Override
    public ListSongVo findStyle(String style) {
        ListSongVo listSongVo = new ListSongVo();
        List<SongListVo> songListByStyle = songMapper.findSongListByStyle(style);
        List<SList> listByStyle = listMapper.findListByStyle(style);
        listSongVo.setSLists(listByStyle);
        listSongVo.setSongs(songListByStyle);
        return listSongVo;
    }
}
